/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ifs.RnD.Graph;

import ifs.RnD.revisionRead.DisplayReposiroryHistory;
import ifs.RnD.svnRead.DisplayRepositoryTree;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JPopupMenu;

/**
 *
 * @author chjslk
 */
class NodeMenu extends JPopupMenu {

    JMenuItem anItem1;
    JMenuItem anItem2;
    String url, type;
    DisplayReposiroryHistory drh;
    DisplayRepositoryTree disRepoTree;

    /** Creates a new instance of NodeMenu. this creates the right click menu
     * @param url
     *  @param nType
     *  @param dRepoTree 
     */
    public NodeMenu(final String url, String nType, DisplayRepositoryTree dRepoTree) {
        this.url = url;
        this.type = nType;
        this.disRepoTree = dRepoTree;

        anItem1 = new JMenuItem("Revision Graph");
        add(anItem1);
        anItem1.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                System.out.println("Revision  : " + url);
                System.out.println("The type is : " + type);
                drh = new DisplayReposiroryHistory(url, type, disRepoTree);


            }
        });

    }
}
